package com.lvtu.monitor.notification.mail;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.lvtu.monitor.dao.exmatch.po.ExDetail;

/** 
 * @Title: ObserverRunable.java 
 * @Package com.lvtu.monitor.notification.mail 
 * @Description: TODO 
 * @author dengcheng 
 * @date 2015-5-22 下午2:19:11 
 * @version V1.0.0 
 */

@Repository
public class ObserverRunable implements Runnable{
	
	@Autowired
	ExObservable observable;
	@Autowired
	ExObserver observer;
	
	private ExDetail ex;
//	public ObserverRunable (ExObservable observable,ExObserver observer,String Ex){
//		this.observable = observable;
//		this.observer = observer;
//		this.Ex = Ex;
//	}
	@Override
	public void run() {
		// TODO Auto-generated method stub
		
		observable.addObserver(this.observer);
		observable.setEx(ex);
	
	}
	public ExDetail getEx() {
		return ex;
	}
	public void setEx(ExDetail ex) {
		this.ex = ex;
	}

}
